﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QLVeChuyenBay
{
    public partial class frmBaoCaoDoanhThuNam : Form
    {
        public frmBaoCaoDoanhThuNam()
        {
            InitializeComponent();
        }

        private void frmBaoCaoDoanhThuNam_Load(object sender, EventArgs e)
        {
            txtNam.Text = DateTime.Now.Year.ToString();
            
        }

        private void btnXemBaoCao_Click(object sender, EventArgs e)
        {
            this.ViewDoanhThuNamTableAdapter.Fill(this.DataSetBaoCaoDoanhThu.ViewDoanhThuNam,txtNam.Text);

            this.reportViewer1.RefreshReport();
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void txtNam_KeyPress(object sender, KeyPressEventArgs e)
        {
            txtNam.MaxLength = 4;
            if (!Char.IsDigit(e.KeyChar) && !Char.IsControl(e.KeyChar))
            {
                e.Handled = true;

            }
        }
    }
}
